import Vue from 'vue'
import VueI18n from 'vue-i18n'
import enLocale from './langs/en-us'
import zhLocale from './langs/zh-cn'
import 'element-ui/lib/theme-chalk/index.css'

Vue.use(VueI18n)
const messages = {
  'en-us': {
    ...enLocale
  },
  'zh-cn': {
    ...zhLocale
  }
}

const i18n = new VueI18n({
  locale: localStorage.lang || 'zh-cn',
  messages
})

export default i18n
